summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-03 23:08:25 +0100
committerLiam <byteslice@airmail.cc>2023-12-03 23:08:25 +0100
commitf05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f (patch)
tree9ed86038d43590b1bbee51a552c17b4bce276102
parentrenderer_vulkan: do not recreate swapchain for srgb (diff)
downloadyuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar.gz
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar.bz2
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar.lz
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar.xz
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.tar.zst
yuzu-f05cb69d4fb6c0f8d94f9f2a8c4b3bffeb92928f.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp1
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp9
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.h1
3 files changed, 2 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 7cf24e1ad..279e5a4e0 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -726,7 +726,6 @@ bool RasterizerOpenGL::AccelerateDisplay(const Tegra::FramebufferConfig& config,
screen_info.texture.width = image_view->size.width;
screen_info.texture.height = image_view->size.height;
screen_info.display_texture = image_view->Handle(Shader::TextureType::Color2D);
- screen_info.display_srgb = VideoCore::Surface::IsPixelFormatSRGB(image_view->format);
return true;
}
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 6bfed08a1..7a4f0c5c1 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -653,11 +653,7 @@ void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) {
};
glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices));
- if (screen_info.display_srgb) {
- glEnable(GL_FRAMEBUFFER_SRGB);
- } else {
- glDisable(GL_FRAMEBUFFER_SRGB);
- }
+ glDisable(GL_FRAMEBUFFER_SRGB);
glViewportIndexedf(0, 0.0f, 0.0f, static_cast<GLfloat>(layout.width),
static_cast<GLfloat>(layout.height));
@@ -710,8 +706,7 @@ void RendererOpenGL::RenderScreenshot() {
GLuint renderbuffer;
glGenRenderbuffers(1, &renderbuffer);
glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
- glRenderbufferStorage(GL_RENDERBUFFER, screen_info.display_srgb ? GL_SRGB8 : GL_RGB8,
- layout.width, layout.height);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_SRGB8, layout.width, layout.height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer);
DrawScreen(layout);
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h
index f1d5fd954..b70607635 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.h
+++ b/src/video_core/renderer_opengl/renderer_opengl.h
@@ -53,7 +53,6 @@ struct TextureInfo {
struct ScreenInfo {
GLuint display_texture{};
bool was_accelerated = false;
- bool display_srgb{};
const Common::Rectangle<float> display_texcoords{0.0f, 0.0f, 1.0f, 1.0f};
TextureInfo texture;
};